package com.example.trb.vo;

import com.example.trb.validation.DateTime;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class EducationVO {
    Integer id;

    @NotNull(message = "毕业时间不能为空")
    @DateTime(message = "毕业时间的格式为yyyy-MM-dd", format = "yyyy-MM-dd")
    private String graduationTime;

    @NotBlank(message = "毕业学校不能为空")
    private String school;

    @NotBlank(message = "专业不能为空")
    private String specialty;

    @NotBlank(message = "学制不能为空")
    @Pattern(regexp = "三年|四年")
    private String academicStructure;

    @NotBlank(message = "毕业证书不能为空")
    @Length(min = 18, max = 18)
    private String educationNumber;

    @NotBlank(message = "学位不能为空")
    @Pattern(regexp = "硕士|学士|博士")
    private String degree;

    @NotNull(message = "学历证明材料不能为空")
    private String[] materials;



}
